package com.mmall.other.example;/**
 * Created with IDEA
 * Author : wangfei
 * Date :  2019/10/23
 * Time : 8:55
 * Describe :
 */

import com.mmall.other.example.abstr.KidsDto;

import java.util.*;

/**
 * @ClassName HashMapAndHashTableExample1
 * @Describe :
 * @Author : wangfei 
 * @Date :  2019/10/23 8:55
 */
public class HashMapAndHashTableExample1 {
	public static void main(String[] args) {
//		能有 一个 null 的key 和多个 null 的value  线程不安全 实现 map 接口
		HashMap map = new HashMap(4);
		map.put(null, "张山");
		map.put(null, "张四");
		System.out.println(map.get(null));

//		key value 都不能为null  线程安全 继承 Dictionary 类
		Hashtable hashtable = new Hashtable();
		hashtable.put("", "张山");
		System.out.println(hashtable.get(""));


		String str = "sss";
		str.length();
		int num = 886;

		Set set = new LinkedHashSet();

//		Map

		KidsDto kidsDto = new KidsDto(null,"20");
		System.out.printf(""+kidsDto.getName());

//		Vector
	}

}
